/*
 * @Author: your name
 * @Date: 2020-08-13 09:54:09
 * @LastEditTime: 2020-08-13 10:00:35
 * @LastEditors: your name
 * @Description: In User Settings Edit
 * @FilePath: \shici_demo\assets\Script\audioMgt.ts
 */

const {ccclass, property} = cc._decorator;

@ccclass
export class audioMgr extends cc.Component {

    @property({
        type: cc.AudioClip,
    })
    public btnClick_mp3: cc.AudioClip = null;
    @property({
        type: cc.AudioClip,
    })
    public tileClick_mp3: cc.AudioClip = null;
    @property({
        type: cc.AudioClip,
    })
    public tileSuc_mp3: cc.AudioClip = null;
    @property({
        type: cc.AudioClip,
    })
    public tipsClick_mp3: cc.AudioClip = null;
    @property({
        type: cc.AudioClip,
    })
    public levelSuc_mp3: cc.AudioClip = null;

    // 1. 播放按钮点击音效
    public playBtnClickMp3(): void {
        cc.audioEngine.play(this.btnClick_mp3, false, 1);
    }

    // 2. 播放格子点击音效
    public playTileClickMp3(): void {
        cc.audioEngine.play(this.tileClick_mp3, false, 1);
    }

    // 3. 播放格子正确音效
    public playTileSucMp3(): void {
        cc.audioEngine.play(this.tileSuc_mp3, false, 1);
    }

    // 4. 播放提示音效
    public playTipsClickMp3(): void {
        cc.audioEngine.play(this.tipsClick_mp3, false, 1);
    }

    // 5. 播放关卡完成音效
    public playLevelSucMp3(): void {
        cc.audioEngine.play(this.levelSuc_mp3, false, 1);
    }

}
